Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
i would like to loop through this and get each "transactionReference"
"responseBody": {
        "content": [{
                "paymentMethod": "ACCOUNT_TRANSFER",
                "createdOn": "2019-10-29T11:02:00.000+0000",
                "amount": 22.00,
                "flagged": false,
                "currencyCode": "NGN",
                "completedOn": "2019-10-29T11:08:11.000+0000",
                "paymentDescription": "Isoken 001",
                "paymentStatus": "EXPIRED",
                "transactionReference": "MNFY|20191029110159|005805",
                "paymentReference": "MNFY|20191029110159|005805",
                "merchantCode": "ZETBBQ5Q7VLB",
                "merchantName": "Lahray LTD "
            },
            {
                "paymentMethod": "ACCOUNT_TRANSFER",
                "createdOn": "2019-10-29T10:45:12.000+0000",
                "amount": 22.00,
                "flagged": false,
                "fee": 0.18,
                "currencyCode": "NGN",
                "completedOn": "2019-10-29T10:49:49.000+0000",
                "paymentDescription": "Isoken 001",
                "paymentStatus": "PAID",
                "transactionReference": "MNFY|20191029104511|005830",
                "paymentReference": "MNFY|20191029104511|005830",
                "merchantCode": "ZETBBQ5Q7VLB",
                "merchantName": "Lahray LTD ",
                "payableAmount": 22.00
            }
        ],
        "last": false,
        "totalElements": 258,
        "totalPages": 129,
        "first": true,
        "numberOfElements": 2,
        "size": 2,
        "number": 0,
        "empty": false
    }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Hello you try to do Object Iteration, check the official documentation's link in PHP for more.

Clear Point: let me explain it simply as who I'm see the thing, your output is an object output.. let suppose that object is named "transactionReferences"

You can looping thought this object. Foreach loop would work fine with you in this case.

How it works:

foreach ($transactionReferences as $value) {
   echo $obj->property;
}

More approach using to access your object properties

foreach ($transactionReferences as $value){
      echo $value->content;
}

Hope this explanation helps

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda